<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        #box{
            display: flex;
            width: 250px;
            height: 300px;
            background-color: #e98d8d;
           
        }
        #box div{
            width: 50px;
            height: 50px;
        }
        .a1{   /*值越小排越前*/
            order: 3;

        }
        .a2{
            order: 2;

        }
        .a3{
            order: 1;
        }
    </style>
</head>
<body>
    <div id="box">
        <div class="a1" style="background-color: red;">1</div>
        <div class="a2" style="background-color:yellow;">2</div>
        <div class="a3" style="background-color: black;">3</div>
    </div>
</body>
</html>
